/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2016 pjoc.pub, blademainer.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

package pub.pjoc.pay.channels.wechat.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData;

/**
 * 基本参数
 * @author blademainer
 * @version 2016-08-02 14:20
 */
@JsonRootName("xml")
public class ReturnResult {
  public static final String SUCCESS = "SUCCESS";
  public static final String FAIL = "FAIL";

  /**
   * 返回状态码	return_code	是	String(16)	SUCCESS
   * SUCCESS/FAIL
   * 此字段是通信标识，非交易标识，交易是否成功需要查看result_code来判断
   */
  @JsonProperty("return_code")
  @JacksonXmlCData
  private String returnCode;

  /**
   * 返回信息	return_msg	否	String(128)	签名失败
   * 返回信息，如非空，为错误原因
   * 签名失败
   * 参数格式校验错误
   */
  @JsonProperty("return_msg")
  @JacksonXmlCData
  private String returnMsg;

  public String getReturnCode() {
    return returnCode;
  }

  public void setReturnCode(String returnCode) {
    this.returnCode = returnCode;
  }

  public String getReturnMsg() {
    return returnMsg;
  }

  public void setReturnMsg(String returnMsg) {
    this.returnMsg = returnMsg;
  }

  @Override
  public String toString() {
    return "ReturnResult{returnCode='" + returnCode + '\''
        + ", returnMsg='" + returnMsg + "}";
  }
}
